<%--
  Created by IntelliJ IDEA.
  User: haojianlei
  Date: 2018-11-23
  Time: 13:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 查看邮件</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-content mailbox-content">
                    <div class="file-manager" style="font-size: 14px;margin-left: 15px">

                        <ul class="folder-list m-b-md" style="padding: 0px">
                            <li>
                                <a href="toSystemHome.do" style="color: #0d8ddb;font-weight: 700"> <i class="fa fa-circle text-navy" style="color: #0d8ddb"></i>企业信息</a>
                            </li>
                            <li>
                                <a href="toPersonalInfo.do"> <i class="fa fa-circle text-navy" style="color: #cad6f0"></i>个人信息</a>
                            </li>
                            <li>
                                <a href="toStaffInfo.do"> <i class="fa fa-circle text-navy" style="color: #cad6f0"></i>员工管理</a>
                            </li>
                        </ul>

                        <ul class="folder-list m-b-md" style="padding: 0">
                            <li>
                                <a href="toGoodName.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>货种名称配置</a>
                            </li>
                            <li>
                                <a href="toGooderName.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>货主名称配置</a>
                            </li>
                            <li>
                                <a href="toLogistics.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>港口名称配置</a>
                            </li>
                        </ul>

                        <ul class="folder-list m-b-md" style="padding: 0">
                            <li>
                                <a href="toRecharge.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>账户充值</a>
                            </li>
                            <li>
                                <a href="toRechargeDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>充值记录</a>
                            </li>
                            <li>
                                <a href="toExpensesDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>消费记录</a>
                            </li>
                            <li>
                                <a href="toFindShipDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>找船记录</a>
                            </li>
                        </ul>

                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-9 animated fadeInRight">

            <div class="mail-box">
                <div class="mail-body" style="height: 660px">
                    <div class="row">
                        <div class="col-sm-6"> <h3 style="font-weight: 700">企业信息管理</h3></div>
                        <div class="col-sm-6">   <button class="btn btn-primary pull-right" onclick="modifyInfo()" data-toggle="modal" data-target="#companyInfoModel">编辑</button></div>
                    </div>

                    <hr class="simple" color="#6f5499"/>
                    <div class="row" style="margin-top: 20px">
                        <div class="col-sm-6">企业名称：<span id="companyName">&nbsp;</span></div>
                        <div class="col-sm-6">专属客户经理：<span id="customerManager">&nbsp;</span></div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">企业地址：<span id="companyAddress">&nbsp;</span></div>
                        <div class="col-sm-6">经理联系电话：<span id="customerManagerPhone">&nbsp;</span></div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">联系人：<span id="contactMan"></span></div>
                        <div class="col-sm-6">联系人手机：<span id="mobilePhone">&nbsp;</span></div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">电话：<span id="iphone"></span></div>
                    </div>
                    <div class="row" style="margin-top: 10px;height: 60px;">
                        <div class="col-sm-6">备注：<span id="note">&nbsp;</span></div>
                    </div>

                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
</div>

<%--编辑公司详情模态框--%>
<div class="modal fade" id="companyInfoModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:80%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h3 class="modal-title">
                    编辑企业信息
                </h3>
            </div>
            <div class="modal-body">
                <div class="form-horizontal m-t" >
                    <div class="row">
<%--                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">企业名称：</label>
                                <div class="col-sm-8">
                                    <input id="companyName" name="companyName" class="form-control" type="text">
                                </div>
                            </div>
                        </div>--%>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">电话：</label>
                                <div class="col-sm-8">
                                    <input id="phone" name="companyPhone" class="form-control" type="text">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系地址：</label>
                                <div class="col-sm-8">
                                    <input id="address" name="endTime" class="form-control" type="text">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-8">
                                    <input id="inote" name="endTime" class="form-control" type="text">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-8">
                                    <button class="btn btn-primary pull-left" id="edit-finsin" type="submit">编辑完成</button>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-8">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- end -->


<!-- 全局js -->
<script src="${pageContext.request.contextPath}/assets/shipui/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/assets/shipui/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${pageContext.request.contextPath}/assets/shipui/js/plugins/sweetalert/sweetalert.min.js"></script>

<!-- 自定义js -->
<script src="${pageContext.request.contextPath}/assets/shipui/js/content.js?v=1.0.0"></script>

<script type="text/javascript">


    //修改企业信息
    $("#edit-finsin").click(function () {
        var data = JSON.stringify({phone:$('#phone').val(),address:$('#address').val(),note:$('#inote').val()});
        $.ajax({
            url: 'company/editCompany.do',
            data: data,
            type: 'post',
            contentType: "application/json",
            dataType: 'json',
            success: function (result) {
                if(!result.SUCCESS){
                    swal({
                        title: result.MSG,
                        type: "warning"
                    },function () {
                        location.reload();
                    });
                }else{
                    swal({
                        title: result.MSG,
                        type: "success"
                    },function () {
                        location.reload();
                    });
                }
            }
        })
    });

    //企业信息设定初始化
    $.ajax({
        url: 'company/queryCompany.do',
        type: 'GET',
        contentType: "application/json",
        dataType: 'json',
        success: function (result) {
            $('#companyName').text(result.companyName);
            $('#customerManager').text(result.customerManager);
            $('#companyAddress').text(result.address);
            $('#customerManagerPhone').text(result.customerManagerPhone);
            $('#contactMan').text(result.contactMan);
            $('#mobilePhone').text(result.mobilePhone);
            $('#iphone').text(result.phone);
            $('#note').text(result.note);
        }
    })


</script>




</body>

</html>
